package net.heri.xmpp;


public class XmppDemo {

	public static void main(String[] args) throws Exception {
		 String username = "user2";
	        String password = "1234";
	        
	        XmppManager xmppManager = new XmppManager("localhost", 5222);
	        
	        xmppManager.init();
	        xmppManager.performLogin(username, password);
	        xmppManager.setStatus(true, "Hello everyone");
	        
	        String buddyJID = "user1";
	        String buddyName = "User 1";
	        xmppManager.createEntry(buddyJID, buddyName);
	        
	        xmppManager.sendMessage("Hello mate", "user1@127.0.0.1");
	        
	        boolean isRunning = true;
	        
	        while (isRunning) {
	            Thread.sleep(50);
	        }
	        
	        xmppManager.destroy();
	}
}
